package com.xxxx.server.controller;


import com.xxxx.server.pojo.Menu;
import com.xxxx.server.service.IMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  菜单管理
 * </p>
 *
 * @author 学海无涯
 * @since 2021-11-15
 */
@RestController
@RequestMapping("/system/cfg")
@Api(tags = "菜单管理")
public class MenuController {

    @Autowired
    private IMenuService iMenuService;

    /**
     * 添加点注释
     * @return
     */
    @ApiOperation(value = "通过用户ID查询菜单列表")
    @GetMapping("menu")
    public List<Menu> getMenusByAdminId(){
        return iMenuService.getMenusByAdminId();
    }
}
